import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
# 窗口最大化
driver.maximize_window()

driver.get("https://www.bilibili.com/")
# driver.find_element(By.CLASS_NAME,'nav-search-input').send_keys("唐朝诡实录")
# driver.find_element(By.CLASS_NAME,'nav-search-btn').click()

# driver.find_element(By.CLASS_NAME,"channel-link").click()
# driver.find_elements(By.CLASS_NAME,"channel-link").click()
# driver.find_elements(By.CLASS_NAME,"channel-link")[4].click()
# for ele in driver.find_elements(By.CLASS_NAME,"channel-link"):
#     print(ele.text)


# class name中有空格，则将空格改为.
driver.find_element(By.CLASS_NAME,"icon-bg.icon-bg__dynamic").click()

time.sleep(3)
driver.close()

